package com.example.demo.common.enums;

/**
 * 个体户办理资料不合格时，重新上传数据的枚举提示
 */
public enum RedoStatusEnum {
    AGAIN_SIGN_PLATFORM("1","重新签署平台协议书"),
    AGAIN_SIGN_AGREEMENT("2","重新签署委托协议书"),
    AGAIN_PLATFORM_AGREEMENT("3","重新签署平台协议书和重新签署委托协议书"),
    AGAIN_UPLOAD_VIDEO("4","重新上传意愿视频"),
    AGAIN_PLATFORM_VIDEO("5","重新签署平台协议书和重新上传意愿视频"),
    AGAIN_AGREEMENT_VIDEO("6","重新签署委托协议书和重新上传意愿视频"),
    AGAIN_PLATFORM_AGREEMENT_VIDEO("7","重新签署平台协议书，重新签署委托协议书，重新上传意愿视频");
    private String code;    //代码
    private String msg;    //描述

    RedoStatusEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static RedoStatusEnum getRedoStatusEnum(String code) {
        for (RedoStatusEnum j : RedoStatusEnum.values()) {
            if (j.getCode().equals(code)) {
                return j;
            }
        }
        return null;
    }


    public boolean toEquals(Object code) {
        if (code == null) {
            return false;
        }
        String temp = String.valueOf(code);
        return this.code.equals(temp) ;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
